import React, {Component} from 'react';
import {inject, observer} from 'mobx-react';
import cssModules from 'react-css-modules';
import {Button, List, Row, Icon, Form, Select, Input} from 'antd';
import {PageHeader} from 'ant-design-pro';
import DataTable from './DataTable';
import Toolbar from '../../component/Toolbar';
import CommonModal from '../../component/CommonModal';

import styles from './style.less';

@inject('LogStore', 'GlobalStore')
@observer
@cssModules(styles)
class SearchList extends Component {
  constructor(props) {
    super(props);

    this.store = this.props.LogStore;
  }

  async componentWillMount() {
    const {location, match, history} = this.props;

    await this.store.onWillMount(location, match, history);
    await this.props.GlobalStore.setCurrentPage(this);
  }
  reset() {
    const {onWillMount, reset} = this.props.LogStore;
    onWillMount();
    reset();
  }

  render() {
    const {tableData, loading} = this.store;
    return (
      <div>
        <div styleName={'container'}>
          <div>
            <DataTable data={tableData} />
          </div>
        </div>
      </div>
    );
  }
}
export default SearchList;
